package com.ims.core.doc.service;

import java.util.List;
import com.ims.core.doc.domain.TInInvoice;

/**
 * 进项发票Service接口
 *
 * @author IMS
 * @date 2024-05-20
 */
public interface ITInInvoiceService
{
    /**
     * 查询进项发票
     *
     * @param invoiceId 进项发票主键
     * @return 进项发票
     */
    public TInInvoice selectTInInvoiceByInvoiceId(String invoiceId);

    /**
     * 查询进项发票
     *
     * @param invoiceNumber 进项发票号
     * @return 进项发票
     */
    public TInInvoice selectTInInvoiceByInvoiceNumber(String invoiceNumber);

    /**
     * 查询进项发票列表
     *
     * @param tInInvoice 进项发票
     * @return 进项发票集合
     */
    public List<TInInvoice> selectTInInvoiceList(TInInvoice tInInvoice);

    /**
     * 查询抵扣进项发票列表
     *
     * @param tInInvoice 进项发票
     * @return 进项发票集合
     */
    public List<TInInvoice> selectDeductionInInvoiceList(TInInvoice tInInvoice);

    /**
     * 根据税期查询查询进项发票列表
     *
     * @param period 税期
     * @return 进项发票集合
     */
    public List<TInInvoice> selectDeductionInInvoiceListByPeriod(String period);

    /**
     * 新增进项发票
     *
     * @param tInInvoice 进项发票
     * @return 结果
     */
    public int insertTInInvoice(TInInvoice tInInvoice);

    /**
     * 修改进项发票
     *
     * @param tInInvoice 进项发票
     * @return 结果
     */
    public int updateTInInvoice(TInInvoice tInInvoice);

    /**
     * 批量删除进项发票
     *
     * @param invoiceIds 需要删除的进项发票主键集合
     * @return 结果
     */
    public int deleteTInInvoiceByInvoiceIds(String[] invoiceIds);

    /**
     * 删除进项发票信息
     *
     * @param invoiceId 进项发票主键
     * @return 结果
     */
    public int deleteTInInvoiceByInvoiceId(String invoiceId);

    /**
     * （从百望）同步系统内历史发票信息
     */
    public void invoiceHistoryDataSyncFromBaiwang();

    /**
     * （从百望）同步系统内所有税号的发票
     */
    public void invoiceDeductionDataSyncFromBaiwang();

    /**
     * （从百望）未获取完整信息的进项发票，同步完整信息
     */
    public void inIinvoiceDetailDataSyncFromBaiwang();

    /**
     * （从百望）同步历史进项发票
     * @param month 从该月数开始获取
     */
    public void inIinvoiceHisDataSyncFromBaiwang(int month);

    /**
     * 1. 勾选抵扣
     * @param invoiceIds
     */
    public void deductionApplyByInvoiceIds(String[] invoiceIds);

    /**
     * 1. 勾选抵扣申请结果查询
     * @param deductionId
     */
    public void deductionApplyResult(String deductionId);

    /**
     * 2. 取消勾选抵扣
     * @param invoiceIds
     */
    public void deductionApplyCancelByInvoiceIds(String[] invoiceIds);

    /**
     * 2. 取消勾选抵扣申请结果查询
     * @param deductionId
     */
    public void deductionApplyCancelResult(String deductionId);

    /**
     * 3. 勾选不抵扣
     * @param invoiceIds
     * @param reason 不抵扣原因
     * @param reasonRemark 不抵扣原因备注
     */
    public void deductionCancelnonApplyByInvoiceIds(String[] invoiceIds, String reason, String reasonRemark);

    /**
     * 3. 勾选不抵扣申请结果查询
     * @param deductionId
     */
    public void deductionCancelnonApplyResult(String deductionId);

    /**
     * 4. 取消勾选不抵扣
     * @param invoiceIds
     */
    public void deductionCancelnonApplyCancelByInvoiceIds(String[] invoiceIds, String reason, String reasonRemark);

    /**
     * 4. 取消勾选不抵扣申请结果查询
     * @param deductionId
     */
    public void deductionCancelnonApplyCancelResult(String deductionId);


}
